Skip to content

chore: standardize repository config - #90

Merged
afc163 merged 29 commits into
masterfrom
codex/standardize-rc-config
Jun 29, 2026
Merged

chore: standardize repository config#90
afc163 merged 29 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tour Ready Ready Preview, Comment Jun 29, 2026 6:42am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-tour-preview-pr-90.surge.sh (may be unavailable)
📝 Commit0d4fec7
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-tour-preview-pr-90.surge.sh
           size: 81 files, 1.7 MB

   Aborted - you do not have permission to publish to react-component-tour-preview-pr-90.surge.sh

🤖 Powered by surge-preview

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb807111-5756-4607-b384-83922dcbd2e9

📥 Commits

Reviewing files that changed from the base of the PR and between 8f954e1 and 0d4fec7.

📒 Files selected for processing (13)
  • .dumirc.ts
  • .fatherrc.ts
  • .github/dependabot.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • .husky/pre-commit
  • .prettierignore
  • README.md
  • README.zh-CN.md
  • package.json
  • tsconfig.json

Walkthrough

仓库配置、文档、示例和 GitHub 工作流更新为新的 @rc-component/tour 包入口与发布布局;README 和 API 文档重写,示例统一切换为包导入,资金、依赖、忽略规则与部署配置也同步调整。

Changes

发布与文档更新

Layer / File(s) Summary
包入口和构建配置
.dumirc.ts, package.json, tsconfig.json, vercel.json
@rc-component/tour 的别名、src/index.tsx 路径映射、docs-dist 输出目录、GH_PAGES 基础路径,以及包脚本和 Vercel 构建配置被更新。
文档首页与 API
README.md, docs/index.md
README.md 的标题、Highlights、Install/Usage/API/Development/Release/License 章节被重写,docs/index.md 的页面标题元信息改为 @rc-component/tour
示例导入切换
docs/examples/{arrow,basic,center,closable,customBuiltinPlacements,customMask,gap-horizon,gap-radius,gap,inline,notFound,open,placement,strictMode}.tsx
示例文件改为从 @rc-component/tour 及其 es/placements 入口导入,示例主体逻辑保持不变。
示例结构与属性格式
docs/examples/{animated,center,closable,customMask,scrollIntoView}.tsx
部分示例保留原有行为,但重排了 JSX、对象字面量和本地事件处理代码;scrollIntoView 还将选项对象改为多行写法。
仓库维护配置
.github/FUNDING.yml, .github/dependabot.yml, .gitignore
FUNDING、Dependabot 和 .gitignore 的条目、计划和忽略范围被更新。
工作流定义
.github/workflows/{main.yml,preview.yml,react-component-ci.yml,react-doctor.yml,surge-preview.yml}
新的测试、react-doctor 和 Surge preview 工作流被加入,旧的工作流定义被替换。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • zombieJ

Poem

兔子蹦进新门牌,tour 名换上云天来。
文档翻页星光亮,示例齐跳包入口台。
工作流里风儿转,预览构建一起开。
🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了此次以仓库配置标准化为主的改动,且与 README、CI、部署和依赖配置更新一致。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 0d4fec7.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.16%. Comparing base (cddc400) to head (0d4fec7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #90   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files          10       10           
  Lines         239      239           
  Branches      106      104    -2     
=======================================
  Hits          237      237           
  Misses          2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the project configuration, documentation, and examples to the @rc-component/tour package name. Key updates include modifying path aliases in .dumirc.ts and tsconfig.json, updating example imports, adding a Vercel configuration, and revising the README.md documentation. Feedback suggests separating the build step from the publishing tool in package.json to avoid potential infinite loops with prepublishOnly, mapping the ES module path directly to src/index.tsx in tsconfig.json for consistency, and removing a redundant wildcard alias in .dumirc.ts.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread README.md Outdated
Comment thread tsconfig.json Outdated
Comment thread .dumirc.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
.github/workflows/surge-preview.yml (1)

34-36: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

预览构建建议使用 npm ci 以保证可复现性。

npm install 可能会改写 package-lock.json 并解析出与锁文件不一致的依赖版本。在 CI 预览场景下,若仓库已提交锁文件,使用 npm ci 能保证安装结果可复现且更快。

♻️ 建议改动
           build: |
-            npm install
+            npm ci
             npm run build
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/surge-preview.yml around lines 34 - 36, The preview build
step in the surge workflow currently uses npm install, which can drift from the
lockfile and make CI runs less reproducible. Update the build command in the
workflow to use npm ci instead, keeping the rest of the build sequence in the
same job unchanged so the dependency install remains deterministic when the lock
file is present.
.github/workflows/react-component-ci.yml (1)

11-12: 🔒 Security & Privacy | 🔵 Trivial

收紧传递给可复用工作流的密钥范围。

被调用的工作流 test-utoo.yml 仅实际使用了 CODECOV_TOKEN 密钥(通过 codecov/codecov-action@v5)。当前使用 secrets: inherit 会无条件转发所有仓库密钥,违反了最小权限原则。建议改为显式传递仅必要的密钥。同时,@main 引用未固定到具体提交哈希,存在供应链风险,建议在条件允许时进行固定。

🔒 按需传递密钥示例
   test:
     uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
-    secrets: inherit
+    secrets:
+      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/react-component-ci.yml around lines 11 - 12, The reusable
workflow invocation in the CI job is over-broad because `secrets: inherit`
forwards every repository secret, and the `@main` reference is not pinned.
Update the workflow call to explicitly pass only the `CODECOV_TOKEN` secret used
by `test-utoo.yml` and replace the
`react-component/rc-test/.github/workflows/test-utoo.yml@main` reference with a
fixed commit SHA to tighten access and reduce supply-chain risk.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 68-78: Update the package.json engines.node constraint to match
the واقعی runtime requirements by raising it from >=8.x to >=12.20. The issue is
in the package metadata around the peerDependencies/engines block, and the fix
should keep the declared Node support aligned with the minimum version required
by typescript and cross-env so installs and runtime checks reflect the actual
supported environment.

In `@README.md`:
- Around line 19-25: The README highlight text uses nonstandard wording:
“builtin” should be “built-in” in the user-visible description. Update the
highlighted feature list wording in the README to read “custom built-in
placements” so the documentation uses standard spelling and remains consistent.
- Around line 62-97: The API table in the README has an inaccurate default value
for scrollIntoViewOptions; update the documentation to match the actual default
used in the Tour implementation. Locate the Tour props/docs entry for
scrollIntoViewOptions and replace the vague “center options” text with the
explicit default object shape { block: 'center', inline: 'center' }. Keep the
existing animated and mask entries unchanged since they already match the
source.

---

Nitpick comments:
In @.github/workflows/react-component-ci.yml:
- Around line 11-12: The reusable workflow invocation in the CI job is
over-broad because `secrets: inherit` forwards every repository secret, and the
`@main` reference is not pinned. Update the workflow call to explicitly pass
only the `CODECOV_TOKEN` secret used by `test-utoo.yml` and replace the
`react-component/rc-test/.github/workflows/test-utoo.yml@main` reference with a
fixed commit SHA to tighten access and reduce supply-chain risk.

In @.github/workflows/surge-preview.yml:
- Around line 34-36: The preview build step in the surge workflow currently uses
npm install, which can drift from the lockfile and make CI runs less
reproducible. Update the build command in the workflow to use npm ci instead,
keeping the rest of the build sequence in the same job unchanged so the
dependency install remains deterministic when the lock file is present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbf0cd73-0d7d-47ec-8279-0cf464fc64fa

📥 Commits

Reviewing files that changed from the base of the PR and between cddc400 and 8f954e1.

📒 Files selected for processing (31)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/dependabot.yml
  • .github/workflows/main.yml
  • .github/workflows/preview.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • docs/examples/animated.tsx
  • docs/examples/arrow.tsx
  • docs/examples/basic.tsx
  • docs/examples/center.tsx
  • docs/examples/closable.tsx
  • docs/examples/customBuiltinPlacements.tsx
  • docs/examples/customMask.tsx
  • docs/examples/gap-horizon.tsx
  • docs/examples/gap-radius.tsx
  • docs/examples/gap.tsx
  • docs/examples/inline.tsx
  • docs/examples/notFound.tsx
  • docs/examples/open.tsx
  • docs/examples/placement.tsx
  • docs/examples/scrollIntoView.tsx
  • docs/examples/strictMode.tsx
  • docs/index.md
  • now.json
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (3)
  • .github/workflows/preview.yml
  • now.json
  • .github/workflows/main.yml

Comment thread package.json Outdated
Comment thread README.md
Comment thread README.md
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​husky@​9.1.71001006280100
Addednpm/​cross-env@​10.1.010010010082100
Addednpm/​gh-pages@​6.3.09910010082100
Addednpm/​@​testing-library/​jest-dom@​6.9.110010010089100
Addednpm/​lint-staged@​16.4.010010010097100

View full report

@afc163
afc163 merged commit c8950b6 into master Jun 29, 2026
14 checks passed
@afc163
afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant